package com.foreknow.mapping;

import com.foreknow.bean.Guest;

import java.sql.ResultSet;
import java.sql.SQLException;

public class GuestMappingImpl implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Guest guest = new Guest();
        guest.setId(rs.getInt("id"));
        guest.setName(rs.getString("name"));
        guest.setPhone(rs.getString("phone"));
        guest.setEmail(rs.getString("email"));
        guest.setTitle(rs.getString("title"));
        guest.setContent(rs.getString("content"));
        guest.setCreatedtime(rs.getString("createdtime"));
        return guest;
    }
}
